{php include wl_template('common/header');}
<ul class="nav nav-tabs">
    <li class="active"><a href="#">分类管理</a></li>
</ul>
<div class="app-content">
    <!--顶部内容-->
    <div class="app-filter">
        <div class="filter-action">
            <a href="{php echo web_url('goodshouse/category/cateModel',['plugin'=>$_GPC['p']])}" class="btn btn-primary" data-toggle='ajaxModal'><i class="fa fa-plus"></i> 新建分类</a>
            <a href="{php echo web_url('goodshouse/category/cateImportShop',['plugin'=>$_GPC['p']])}" class="btn btn-default" data-toggle='ajaxPost' data-confirm="确定要导入商家一级分类吗？">一键导入商家分类</a>
        </div>
        <div class="filter-list">
            <form action="" method="get">
                <input type="hidden" name="p" value="{$_GPC['p']}" />
                <input type="hidden" name="ac" value="{$_GPC['ac']}" />
                <input type="hidden" name="do" value="{$_GPC['do']}" />
                <div class="form-group max-with-all">
                    <div class="col-sm-2 control-label">分类类型</div>
                    <div class="col-sm-9">
                        <div class="btn-group">
                            {if p('rush')}
                                <a href="{php echo web_url('rush/category/index')}" class="btn {if $_GPC['p'] == 'rush'}btn-primary{else}btn-default{/if}">抢购</a>
                            {/if}
                            {if p('groupon')}
                                <a href="{php echo web_url('groupon/category/index')}" class="btn {if $_GPC['p'] == 'groupon'}btn-primary{else}btn-default{/if}">团购</a>
                            {/if}
                            {if p('wlfightgroup')}
                                <a href="{php echo web_url('wlfightgroup/fightgoods/categorylist')}" class="btn {if $_GPC['p'] == 'wlfightgroup'}btn-primary{else}btn-default{/if}">拼团</a>
                            {/if}
                            {if p('bargain')}
                                <a href="{php echo web_url('bargain/bargain_web/categorylist')}" class="btn {if $_GPC['p'] == 'bargain'}btn-primary{else}btn-default{/if}">砍价</a>
                            {/if}
                        </div>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-2 control-label">关键字</label>
                    <div class="col-md-4">
                        <input type="text" class=" form-control" name="keyword" value="{$_GPC['keyword']}" placeholder="请输入关键字进行搜索">
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-2 control-label"></label>
                    <div class="col-sm-9">
                        <button class="btn btn-primary" id="submit">筛选</button>
                    </div>
                </div>
            </form>
        </div>
    </div>
    <!--分类列表-->
    <div class="app-table-list">
        <div class="table-responsive">
            <table class="table table-hover">
                <thead class="navbar-inner">
                    <tr>
                        <th class="text-center">ID</th>
                        <th class="text-center">图片</th>
                        <th class="text-center">分类名称(点击编辑)</th>
                        <th class="text-center">排序</th>
                        <th class="text-center">操作</th>
                    </tr>
                </thead>
                <tbody>
                    {loop $list $item}
                        <tr class="text-center">
                            <td>{$item['id']}</td>
                            <td>
                                <img src="{php echo tomedia($item['thumb'])}" style="width: 50px;height: 50px;">
                            </td>
                            <td>
                                <a href='javascript:;' data-toggle='ajaxEdit' data-href="{php echo web_url('goodshouse/category/cateNameChange',['id'=>$item['id'],'plugin'=>$_GPC['p']])}" class="pull-left text-left">
                                    {$item['name']}
                                </a>
                            </td>
                            <td>{$item['sort']}</td>
                            <td>
                                <a class="btn btn-sm btn-warning" href="{php echo web_url('goodshouse/category/cateModel',['id'=>$item['id'],'plugin'=>$_GPC['p']])}" data-toggle='ajaxModal'>编辑</a>
                                <a class="btn btn-sm btn-danger" data-toggle="ajaxRemove" href="{php echo web_url('goodshouse/category/cateDelete',['id'=>$item['id'],'plugin'=>$_GPC['p']])}" data-confirm="确定要删除该分类吗？">删除</a>
                            </td>
                        </tr>
                    {/loop}
                </tbody>
            </table>
        </div>
        <!--分页-->
        <div class="app-table-foot clearfix">
            <div class="pull-left">

            </div>
            <div class="pull-right">
                {$pager}
            </div>
        </div>
    </div>
</div>
{php include wl_template('common/footer');}